/*********************************** (C) COPYRIGHT ******************************
 * address: https://gitee.com/liuniansihuo/multitasks-os
 *
 * Change Logs:
 * Date			Author      	Notes
 * 2019-06-29	LiuHuo			first version
 *
*******************************************************************************/
#ifndef __timer_H_
#define __timer_H_
#include "list.h"

struct timer_list
{
	struct list_head entry;
	unsigned long expires;//定时器当前剩余时间
    unsigned long time;//定时器定时时间
    unsigned long count;//定时器循环计数
	void (*function)(unsigned long data);
	unsigned long data;
};


#define TIMER_UNLIMITED     (0xFFFFFFFFUL) //无限循环

//目前仅对外函数接口
void run_timer(void);
unsigned char timer_item_add(void (*function)(unsigned long data), unsigned long data,unsigned long time,unsigned long count);

#endif

